package com.authen

import com.authen.Role
import com.webboard.*
import com.authen.userInformation.BloodPressure
import com.authen.userInformation.Temperature
/**
 * User domain class.
 */
class User {
        static searchable = true              // <-- Make Comments searchable
	static transients = ['pass']
	static hasMany = [authorities: Role,posts:Post,replies:Reply,bloodPressure:BloodPressure,temperature:Temperature]
	static belongsTo = Role
        
	/** Username */
	String username
	/** User Real Name*/
	String userRealName
	/** MD5 Password */
	String passwd
	/** enabled */
	boolean enabled

	String email
	boolean emailShow
        
        // Add Code by Dev
        char sex

        String phoneNumber

        String address
        
        Date birthDay

	/** description */
	String description = ''

	/** plain password to create a MD5 password */
	String pass = '[secret]'

	static constraints = {
		username(blank: false, unique: true)
		userRealName(blank: false)
		passwd(blank: false ,password:true)
                email(email:true)
		enabled()
	}
}
